﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace GregsList.Models
{
    public class Post
    {
        public string Title { get; set; }
        public string Description { get; set; }
        public string Category { get; set; }
        private DateTime postTime;

        public DateTime PostTime
        {
            get { return postTime; }
        }

        private static int NextPostID = 0;

        private int postID;

        public int PostID
        {
            get { return postID; }
        }
        private int posterID;

        public int PosterID
        {
            get { return posterID; }
        }
        

        //Default Constructor
        public Post(string title, string descr, string category, int usrID)
        {
            Title = title;
            Description = descr;
            Category = category;
            posterID = usrID;
            postID = NextPostID;
            NextPostID++;
            postTime = DateTime.Now;
        }

    }
}